home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 103
/
Vol 103.iso
/
games
/
starship.swf
/
scripts
/
DefineSprite_7
/
frame_1
/
DoAction.as
Wrap
Text File
|
2010-03-13
|
2KB
|
60 lines
function initSession()
{
charTable = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz&=.";
charTableCrypt = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz&=.";
keystring = "whytheheckdoyouwasteyourtimehackingthishighscorelist";
session = "";
while(session.length < 20)
{
session += charTable.charAt(Math.round(Math.random() * (charTable.length - 1)));
}
}
function submit(pGame, pDisciple, pScore0, pScore1)
{
urlSubmit = "http://www.neodelight.com/v4/high_enter.php";
s = "g=" + pGame + "&";
s += "d=" + pDisciple + "&";
s += "s0=" + pScore0 + "&";
s += "s1=" + pScore1 + "&";
s += "se=" + escape(session);
s += "&c=42";
urlSubmit += "?s=" + escape(encrypt(encrypt(s,keystring),"AnotherKey4You2FindOut4815jiagIOm30JK"));
getURL(urlSubmit,"_blank");
}
function encrypt(pString, pKey)
{
text = pString;
crypt = "";
checkSum = 0;
i = 0;
while(i < text.length)
{
char = tableIndex(text.charCodeAt(i),charTable);
shift = tableIndex(pKey.charCodeAt(i % pKey.length),charTable);
code = char + shift + checkSum;
code %= charTable.length;
crypt += charTableCrypt.charAt(code);
checkSum += code;
i++;
}
checkSum %= charTable.length;
return crypt + "" + charTableCrypt.charAt(checkSum);
}
function tableIndex(pCharCode, pTable)
{
j = 0;
while(j < pTable.length)
{
if(pCharCode == pTable.charCodeAt(j))
{
return j;
}
j++;
}
}
_name = "highscores";
charTable = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz&=.";
charTableCrypt = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz&=.";
keystring = "whytheheckdoyouwasteyourtimehackingthishighscorelist";
initSession();